package com.demo.dune.base;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * ResultVO.
 * @author Allen
 * @version 1.0 2022-04-04
 */
@Getter
@Setter
@ToString
public class ResultVO implements IValueObject {

	private static final long serialVersionUID = 5303703495679600258L;

	private String code;
	
	private String msg;
	
	public ResultVO() {
	}
	
	public ResultVO(String code, String msg) {
		this.code = code;
    	this.msg = msg;	
	}
	
	public ResultVO(ResultCodeEnum resultCodeEnum) {
		this.code = resultCodeEnum.getCode();
    	this.msg = resultCodeEnum.getMsg();	
	}

	public void setSuccessResult() {
		this.code = ResultCodeEnum.SUCCESS_HANDLE.getCode();
    	this.msg = ResultCodeEnum.SUCCESS_HANDLE.getMsg();
    }
	
}
